<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>
    //第一种方法声明方式
    //有参无返回值
    function f1(name,age) {
        console.log(name+":"+age)
    }
    f1("刘备",50);
    //有参有返回值
    function f2(name,age) {
        return name+":"+age;
    }
    let info = f2("孙尚香",60);
    console.log(info)


    //第二种方法声明
    let f5 = function (name,age) {
        console.log(name+":"+age);
    }
    f5("吊毛",50);

    //第三种方法声明
    let f6 = new Function("name","age","console.log(name+':'+age)");
    f6("吕布",50);

</script>
</body>
</html>